package cn.wolfcode.crm.mapper;

import cn.wolfcode.crm.domain.Employee;
import cn.wolfcode.crm.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int delete(Long id);

    int insert(Employee employee);

    Employee select(Long id);

    List<Employee> list();

    int update(Employee employee);

    List<Employee> selectForList(QueryObject qo);

    void insertRelation(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);

    void deleteRelation(Long employeeId);

    Employee selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    void batchDelete(@Param("ids") Long[] ids);

    Employee selectByUsername(String username);

    List<Employee> selectByRoleSn(@Param("roleSns") String[] roleSns);
}